require 'active_support/multibyte/unicode'

module IosDev
	class Config
		DEFAULTS = {
			:verbose => false,
			:silent => false,
			:allow_root => false
		}

		attr_accessor :verbose
		alias_method :verbose?, :verbose

		attr_accessor :silent
		alias_method :silent?, :silent

		attr_accessor :allow_root
		alias_method :allow_root?, :allow_root

		def initialize
			@verbose = Config::DEFAULTS[:verbose]
			@silent = Config::DEFAULTS[:silent]
			@allow_root = Config::DEFAULTS[:allow_root]
		end

		def verbose
			@verbose && !silent
		end

		def self.instance
			@instance ||= new
		end

		class << self
			attr_writer :instance
		end

		module Mixin
			def config
				Config.instance
			end
		end
	end
end
